package com.zml.rpc.comsumer;

import com.zml.rpc.comsumer.proxy.RpcClientProxy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class ConsumerBootstrapApplication implements CommandLineRunner {


    @Autowired
    RpcClientProxy rpcClientProxy;
    @Autowired
    ApplicationContext applicationContext;

    public static void main(String[] args) {
        SpringApplication.run(ConsumerBootstrapApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        new Thread(new Runnable() {
            @Override
            public void run() {
                rpcClientProxy.("127.0.01", 8899);
            }
        }).start();
    }
}
